<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

/**
 * 团购信息从表
 * @ author: zuorenci
 * @ email: 904725327@qq.com
 * @ date: 2017/10/24 21:01
 */
class NoticeAttr extends Model
{
    protected $table = 'notice_attr';

    public $timestamps = false;

    protected $fillable = [
        'id', // int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID',
        'tuan_id', // int(11) NOT NULL COMMENT '团购ID',
        'notice_info_id', // int(11) NOT NULL COMMENT '关联团购购买须知副表ID',
    ];

    /**
     * 关联团购从表
     * @ author: zuorenci
     * @ email: 904725327@qq.com
     * @ date: 2017/10/24 21:01
     */
    public function notice_info()
    {
        return $this->hasOne('App\\Models\\NoticeInfo', 'notice_id', 'notice_info_id');
    }
}
